
<?php
	if(isset($new_avatar)){
		foreach($avatars as $av){
			if($av['Avatar']['original'] == 1){
				$original = '<img src="'.$av['Avatar']['url'].'">';
			}elseif($av['Avatar']['width'] == AVATAR_WIDHT_96){
				$preview = '<img src="'.$av['Avatar']['url'].'">';
			}
		}
	}
	//echo $this->Html->tag('div', $this->Html->tag('h3', __('Original', true)).$original, array('class' => 'avatar_original'));
	echo $this->Html->tag('div', $this->Html->tag('h3', __('Preview', true)).$preview, array('class' => 'avatar_preview'));
	echo $this->Html->tag('h3', __('Avatar', true));
	echo sprintf(__('You can upload your personal avatar. The maximum file size is %sMB.', true), 2);
	
	echo $form->create('Avatar',array('action'=>'index', 'type'=>'file'));
	echo $form->input('avatar',array('type'=>'file'));
	echo $form->end(__('Upload', true));
	
?>